The following API changes affect printing in ODF. For an example of how these methods may be used, see the implementation of CDrawPart::PrintInfoChanged in the ODF Draw sample.
This method is called when the FW_CPrintInfo object is created, after the page setup dialog is confirmed, and after the print job dialog is confirmed. This allows the part to make changes based on the current page settings. The base class implementation does nothing.
This method returns, in hRes and vRes, the current resolution of the FW_CPrintInfo in dots per inch.
Returns true if successful and false if an error occured.
-------
Boolean FW_CPrintInfo::SetPrinterResolution(long hRes, long vRes);
This method attempts to set the resolution of the printer represented by the FW_CPrintInfo to the specified horizontal and vertical resolution.
Returns true if successful and false if an error occurred, such as if the printer doesn't support the specified resolution.
Note: The ODF Release 2 implementation returns an error if an attempt is made to set the resolution to any value different from the current printer resolution.
-------
FW_CRect FW_CPrintInfo::GetPaperBounds();
This method returns a rectangle representing the paper dimensions of the FW_CPrintInfo. This will usually be larger than the rectangle returned by GetPageBounds(), which represents the imaging dimensions. It is in the same coordinate system as GetPageBounds(), which will usually return a rectangle with its origin at 0,0.
In order to determine the actual size of the image, it is necessary to use the current printer resolution which may be obtained via FW_CPrintInfo::GetPrinterResolution().
Methods that are now public:
FW_CPrintInfo *FW_CPrintHandler::GetPrintInfo();
This method was formerly private to FW_CPrintHandler(), but is now available so that parts may more easily access printer information. It is not advisable to directly access information in the FW_CPrintInfo object.